package customer.message;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @author jack
 * @data 2020/6/15 3:20 下午
 */
@EnableBinding(ChannelMessage.class)
public class SinkReceiver {
    private static Logger logger = LoggerFactory.getLogger(SinkReceiver.class);

    @StreamListener(ChannelMessage.LIST_AREA)
    public void receive(String payload) {
        logger.info( ChannelMessage.LIST_AREA +  " : " + payload);
    }

    @StreamListener(ChannelMessage.AREA)
    public void receive2(String payload) {
        logger.info(ChannelMessage.AREA +  " : "  + payload);
    }

}
